#!/bin/bash

# SD Project

LOGDIR=/home/cleiber/nameserver

case "$1" in
	start)
	echo "Start omniNames"
	omniNames -start -logdir $LOGDIR &
	;;
	stop)
	echo "Stop omniNames"
	killall omniNames
	rm -rf $LOGDIR/*
	;;
	restart)
	echo "Restart omniNames"
	killall omniNames
	rm -rf $LOGDIR/*
	omniNames -start -logdir $LOGDIR &
	;;
	*)
	echo "Usage nameserver.sh {start|stop|restart}"
	exit 1
esac

exit 0
